package com.three.vip.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.three.core.entity.UserBalance;
import com.three.core.entity.UserIntegral;
import com.three.core.entity.UserIntegralLog;
import com.three.core.vo.R;
import com.three.vip.service.UserIntegralService;
import com.three.vip.vo.CustomerSearchFormVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ：JinShiYan
 * @date ：Created in 2025/3/12 20:37
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/vip/userIntegral")
public class UserIntegralController {

    @Autowired
    private UserIntegralService userIntegralService;

    @PostMapping("/PointManagement")
    public R<IPage<UserIntegralLog>> PointManagement(@RequestBody CustomerSearchFormVo customerSearchFormVo){
        return userIntegralService.PointManagement(customerSearchFormVo);
    }

    @PostMapping("/selectIntegralByUserId")
    public R<UserIntegral> selectIntegralByUserId(@RequestParam Integer id) {
        return userIntegralService.selectBalanceByUserId(id);
    }
}
